home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
djgpp
/
tktdoc
/
install.doc
< prev
next >
Wrap
Text File
|
1994-08-11
|
10KB
|
229 lines
INSTALLATION AND CONFIGURATION
Please install your DESQview/X and supported compiler prior to performing
the toolkit installation. If you have the GNU edition of the toolkit,
the compiler is installed with the toolkit.
The OSF/Motif Toolkit system requirements are as follows:
System Requirements
A PC 386, 486 or Pentium machine.
8MB RAM, 16MB or more recommended.
20MB of free disk space after DESQview/X and the compiler
are installed. If you intend to build many clients, demos and develop
your own programs, then more disk space is required accordingly.
Installation
If you have an old DESQview/X developers toolkit installed, back it
up and delete it in order not to accidentally mix files from the old
and new toolkit distributions.
If you have an old version of DJGPP GNU C/C++ installed, you should
back it up and delete it. Also delete old copies of go32.exe that
may be in other directories on your disk. If they happen to be in
your PATH, it can cause go32 programs not to execute.
If you would like to generate native floating point code with the
MetaWare toolkit, then install the optional 387 libraries offered
to you on the install screen. This applies to MetaWare only.
Place diskette 1 in drive A: and from the C:\DVX directory type A:\INSTALL.
By default the toolkit is installed in C:\DVX. Follow the instructions
in the install program. The install will offer you optional installations
and will allow you to install the toolkit into an alternate directory.
Configuration
The installation will generate a batch file which sets up your environment
correctly for the compiler that you have. The batch files are HIGHC.BAT
for MetaWare, WATCOM.BAT for Watcom and DJGPP.BAT for DJGPP GNU.
Modify your AUTOEXEC.BAT file to invoke the appropriate batch file.
This way the batch file will be invoked prior to your running DESQview/X
and all DOS windows will have the proper environment setup.
Make sure you allow a minimum of 4MB of expanded memory in the DVP
file for the DOS window that you are using the compiler in. If your
machine has 16 MB or more of RAM, it is recommended that you allow
the DOS window to use 8-16 MB of expanded memory for better compile
and link times. See the DESQview/X documentation for DVPMAN.
The following is compiler-specific information.
Metaware
The HIGHC.BAT file is set up to use the HCLE model which uses the
XGLU linker and generates a DOS4GX executable. If you would like to
use the Phar Lap linker and DOS extender, you will need to add the
Phar Lap bin directory to your path and use the Phar Lap linker commands.
Refer to the Phar Lap documentation that came with the product you
purchased from Phar Lap.
The X and Motif Libraries in this toolkit were built with High C/C++
version 3.2. If you already have an older version than this you will
need to purchase a new compiler from MetaWare. See vendor contact
information in Chapter 1.
Edit the HC386SET.CNF file in your \HIGHC\BIN directory, uncomment
the #args line and edit it to reflect:
args=-Hon=Pointers_compatible_with_ints \
-Hon=Pointers_compatible -Hon=Long_enums
You must also define MSDOS for compilations. If you wish you may include
a -DMSDOS on the args line instead of defining it in your makefile.
The compiler toggles will be invoked whenever you invoke the compiler.
They are necessary in order to compile and link X and Motif programs
properly. Refer to the High C documentation for detailed descriptions
of these toggles.
The previous versions of this toolkit required you to compile your
MetaWare objects using the -Hloclib switch and link with the \highc\small\v1x
libraries. Do not use this switch or link with these libraries.
It is subject to minor changes. Refer to the one that was installed
on your system. This is the HIGHC.BAT file for the default install
configuration.
set qmake=-x -f hcle
set path=%PATH%;c:\highc\bin
set ipath=c:\dvx\include;C:\HIGHC\inc;c:\highc\incc
set lib=C:\DVX\lib\hc386;C:\HIGHC\small
set no87=Not using Math co-processor
It sets the default makefile to HCLE.
It adds C:\HIGHC\BIN to the path.
It sets the IPATH which is the path used for
header file inclusion.
It sets LIB which is used by the linker to find
libraries.
It sets NO87 which causes the compiler to use
floating point emulation.
The default for our MetaWare configuration is to use floating point
emulation. This means that all objects are generated as if they had
been built with the -fsoft switch. This is accomplished by having
the NO87 environment variable set. If you wish to use floating point
code, then you need to use the -fx87 switch and link with the X and
Motif libraries which get optionally installed in the HC387 directory.
If you do this, you need to change the LIB line in the batch file
to:
set lib=C:\DVX\lib\hc387;C:\HIGHC\small
in order to link with the 387 libraries. You also need to remove the
"set no87=..." line from the batch file and make sure that
it is not set. In your makefile, the hcsoft.lib library must be replaced
with the hc387.lib library. Refer to the MetaWare documentation for
further details.
Watcom
The WATCOM.BAT file is set up to use the WC4G model which uses the
wlink linker that came with the Watcom compiler. The WCLE model makefiles,
which use the XGLU linker that generates a DOS4GX executable, are
also provided with the clients and demos. If you would like to use
that model all of the time, then you should modify the WATCOM.BAT
file QMAKE line from "qmake=-x -f wc4g" to "qmake=-x -f
wcle"
The X and Motif libraries for Watcom were built with Watcom 9.5 C/C++
32 rev B compiler. If you do not have rev B, contact Watcom for information
on how to obtain the Watcom 9.5 C/C++ 32 rev A and rev B patches.
See vendor contact information in Chapter 1. This toolkit is
upwardly compatible to Watcom 10.0 patch level A.
When building objects using this compiler it is essential that you
use the following toggles or your programs will not work and may not
even compile.
/zp4 /4s /ei /DMSDOS
See the Watcom documentation for detailed descriptions of these toggles.
The MSDOS define is required by the ported X11 and Motif header files.
The environment variables WCC386 and WPP386 are assigned these toggles
and they will be used whenever you invoke the compiler.
This is the WATCOM.BAT for the default install configuration. It is
subject to minor changes. Refer to the one that was installed on your
system.
set path=%PATH%;C:\WATCOM\bin;C:\WATCOM\binb
set watcom=c:\watcom\.
set wcc386=-zp4 -ei -4s -DMSDOS
set wpp386=-zp4 -4s -DMSDOS
set qmake=-x -f wc4g
set include=c:\dvx\include;C:\WATCOM\h
set lib=C:\DVX\lib\c386;C:\WATCOM\lib386\dos;C:\WATCOM\lib386
It adds the watcom bin directories to the PATH.
It sets the WATCOM directory which is used by the wlink linker.
It sets WCC386 which defines default toggles for the C compiler.
It sets WPP386 which defines default toggles for the C++ compiler.
It sets the default makefile to WC4G.
It sets INCLUDE which is the path used for header file inclusion.
It sets LIB which is the path wlink uses to find libraries.
DJGPP GNU
The DJGPP.BAT file is setup to use the "makefile" model which
uses the ld linker and the go32 DOS extender. Using this model requires
that you have a DOS window of nominally 500KB in size. If you have
run Optimize with DESQview/X and configured the DVP file for your
DOS window to at least 500KB of conventional memory, your DOS window
should be large enough.
The compile and link times can be greatly reduced if the DVP for your
DOS window allows it to use 8-16 MB of expanded memory. You must,
of course, have this RAM available on your system.
Additionally this model requires a DOS environment of nominally 1024
bytes. Modify your CONFIG.SYS file to add the "/p /e:1024" switches
to your SHELL line.
The MSDOS variable must be defined at compile time in your makefiles
(i.e., gcc -DMSDOS -c myprog.c ).
This is the DJGPP.BAT file for the default install configuration.
It is subject to minor changes. Refer to the one that was installed
on your system.
set path=%PATH%;C:\DJGPP\bin
set qmake=-x -f makefile
set GO32TMP=C:\DVX\tmp
set TMPDIR=C:\DVX\tmp
set COMPILER_PATH=C:\DJGPP\bin
set C_INCLUDE_PATH=c:\dvx\include;c:\DJGPP\include
set CPLUS_INCLUDE_PATH=c:\dvx\include;c:\djgpp\cplusinc;c:\djgpp\include
set LIBRARY_PATH=C:\DVX\lib\djgpp;C:\DJGPP\lib;.
set BISON_SIMPLE=C:\DJGPP\lib\bison.sim
set BISON_HAIRY=C:\DJGPP\lib\bison.hai
set FLEX_SKELETON=C:\DJGPP\lib\flex.ske
Refer to \DJGPP\DOCS readme and doc files for DJGPP documentation.
The DJGPP distribution contains copyrighted material by the Regents
of the University of California.
Testing the Installation
After the installation is completed and you have configured your system
for the compiler and model you are going to use, you should verify
that your installation is correct before you begin developing or porting
your own applications. You can do this by compiling and running client
and demo programs.
The client program XCALC and the Motif demo program PERIODIC are good
programs to build to verify that your installation is correct. See
Chapter 4, Building a Sample Demo.
There are numerous clients and demos you can build that demonstrate
many features of X and Motif. If you are new to X and Motif programming,
then browsing through the source code of these is a good way to learn
how things work.